package com.qili.service.supervisor;

import com.qili.base.service.BaseService;
import com.qili.entity.supervisor.ProjectContract;
import com.qili.entity.supervisor.dto.ProjectContractDTO;
import com.qili.entity.supervisor.dto.SupervisorProjectDTO;

import java.util.List;

/**
 * Created by lenovo on 2020/11/4.
 */
public interface ProjectContractService extends BaseService<ProjectContract,String> {

    int insert(ProjectContract projectContract);

    /**
     * 验证某个项目的某个文件是否已经上传了至少一个
     * @param supervisorProjectDTO
     * @return      是的:true,   没有: false
     */
    boolean checkFileAtLeastOne(SupervisorProjectDTO supervisorProjectDTO);

    /**
     * 验证某监理文件是否是必选的
     * @param supervisorProjectDTO
     * @return      必选的返回true否则返回false
     */
    boolean checkFileNecessary(SupervisorProjectDTO supervisorProjectDTO);

    /**
     * 查询分包列表
     * 仅查询该分包有关联的承建单位,以及承建单位到货验收为 是 的
     * @param projectContract                   包含项目id的实例
     * @return
     */
    List<ProjectContract> selectPackageWithUnit(ProjectContract projectContract);

    /**
    * @Author:Zhangshuo
    * @Description:根据项目ID删除
    * @param ids
    * @Date:20:44 2020-12-11
    */
    int deleteByProjectIds(String[] ids);

    /**
    * @Description:
    * @Author:Zhangshuo
    * @param projectContract
    * @Date:15:04 2020-12-19
    */
    List<ProjectContract> getProjectPackageByRole(ProjectContract projectContract);
    /**
    * @Author:zhaoyongke
    * @Description:
    * @param projectContract
    * @Date:13:14 2021/2/24
    */
    public List<ProjectContract> selectPackge(ProjectContractDTO projectContract);


    int selectOrderMax(String id);
}
